package com.cl.mapper;

import com.cl.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository
@Mapper
public interface UserMapper {
    /**
     * 注册用户
     * @param email
     * @param pwd
     * @return
     */
    int register(@Param("email")String email,@Param("pwd")String pwd);

    /**
     * 根据邮箱查询用户
     * @param email
     * @return
     */
    User queryByEmail(@Param("email")String email);

    /**
     * 修改密码
     * @param email
     * @return
     */
    int modifyPwd(@Param("email")String email,@Param("newPwd")String newPwd);

    /**
     * 查询今天预约的用户邮箱
     * @param today
     * @return
     */
    List<String> queryToday(@Param("today")String today);
}
